﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HotelManager.BusinessLogic.Abstract;
using HotelManager.BusinessLogic.Concrete;
using HotelManager.DataAccess;
using HotelManager.DataAccess.Concrete;
using HotelManager.DataAccess.Model;

namespace HotelManager.WebUI.Models
{
    public class FilterHotelModel
    {
        public RefinementModel RefinementModel { get; set; }
        public List<ItemFeatureModel> HotelOption { get; set; }

        public FilterHotelModel()
        {
           
        }

        public static List<ItemFeatureModel> ConvertToItemFeature(List<Option> list)
        {
            List<ItemFeatureModel> hotelOptions = new List<ItemFeatureModel>();
            foreach (var option in list)
            {
                hotelOptions.Add(new ItemFeatureModel()
                {
                    Id = option.Id,
                    Title = option.OptionName,
                    Selected = false
                });
            }
            return hotelOptions;
        }
    }

    public class ItemFeatureModel
    {
        public int Id { get; set; }
        public string Title { get; set; }
        public bool Selected { get; set; }
    }
}